package com.xuan.core.configuration.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 配置类：数据库
 */
@Configuration
public class DataSourceConfig {

    /**
     * 关闭数据库定时中断
     */
    @Bean
    public void closeMySqlTimedInterrupt() {
        System.setProperty("druid.mysql.usePingMethod", "false");
    }

    /**
     * 强制创建数据库连接池
     */
//    @Bean
//    public ApplicationRunner runner(DataSource dataSource) {
//        return args -> {
//            Connection connection = dataSource.getConnection();
//        };
//    }


}
